#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
	char input[301];
	int check;
	check = scanf("%s", input);
	if (!check) {
		printf("error\n");
		return -1;
	}
	char result[301];
	char* pi = input;
	char* po = result;
	while (*pi != '\0') {
		while (*pi == *(pi + 1)) {
			if ((*pi >= '0' && *pi <= '9') || (*pi >= 'a' && *pi <= 'z') || (*pi >= 'A' && *pi <= 'Z')){
				break;
			}
			pi++;
		}
		*po++ = *pi++;
	}
	*po = '\0';
	printf("%s\n", result);
	return 0;
}